package com.byb.server.service;

import com.byb.server.domain.ServiceInv;
import com.byb.server.service.dto.ServiceInvDTO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Set;

/**
 * Service Interface for managing ServiceInv.
 */
public interface ServiceInvService {

    /**
     * Save a serviceInv.
     *
     * @param serviceInvDTO the entity to save
     * @return the persisted entity
     */
    ServiceInvDTO save(ServiceInvDTO serviceInvDTO);

    /**
     *  Get all the serviceInvs.
     *
     *  @param pageable the pagination information
     *  @return the list of entities
     */
    Page<ServiceInvDTO> findAll(Pageable pageable);

    /**
     *  Get the "id" serviceInv.
     *
     *  @param id the id of the entity
     *  @return the entity
     */
    ServiceInvDTO findOne(Long id);

    /**
     *  Delete the "id" serviceInv.
     *
     *  @param id the id of the entity
     */
    void delete(Long id);

    /**
     * Search for the serviceInv corresponding to the query.
     *
     *  @param query the query of the search
     *
     *  @param pageable the pagination information
     *  @return the list of entities
     */
    Page<ServiceInvDTO> search(String query, Pageable pageable);

    /**
     *  Get the "id" serviceInvs By ProductId
     * @param id
     * @return the list of entities
     */
    Set<ServiceInvDTO> findAllByProductId(Long id);
}
